home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 272_01 / iscons.doc < prev    next >
Text File  |  1987-07-15  |  808b  |  39 lines

  1.  
  2.  
  3.  
  4.  
  5.         NAME
  6.                 iscons -- is file descriptor the console
  7.  
  8.         SYNOPSIS
  9.                 r = iscons(fd);
  10.                 int r;      TRUE or FALSE returned
  11.                 FILE *fd;   file descriptor to check
  12.  
  13.  
  14.         DESCRIPTION
  15.         The specified file descriptor is tested to see if it refers
  16.         to the console device.  TRUE (not 0)
  17.         is returned if it does, and FALSE (0) otherwise.
  18.         This is a test primarily aimed at detecting if stdin or
  19.         stdout have been redirected away from the default console.
  20.  
  21.  
  22.  
  23.         EXAMPLE
  24.                 if(iscons(stdin)) puts("stdin is the keyboard");
  25.                 else ("stdin is probably a file");
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.         This function is found in SMDLx.LIB for the Datalight Compiler
  39.